package com.wrs.androidkeepalive

import android.graphics.Color
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import com.huashi.bluetooth.HSBlueApi
import org.java_websocket.client.WebSocketClient
import org.java_websocket.drafts.Draft
import org.java_websocket.drafts.Draft_6455
import org.java_websocket.handshake.ServerHandshake
import java.net.URI

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */

fun  sss(view: LinearLayout) {
//    view.addView()
    view.removeView(view)
view.setBackgroundColor(Color.BLACK)
    val layout = LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT)
    view.addView(view, layout)
    val subView = view.findViewWithTag<LinearLayout>("")
    view.tag = ""
    view.findViewWithTag()
}
class ExampleUnitTest {

    fun addition_isCorrect(api: HSBlueApi) {

    }
}

class Client : WebSocketClient {
    constructor(serverUri: URI?) : super(serverUri)

    constructor(serverUri: URI?, protocolDraft: Draft?) : super(serverUri, protocolDraft)

    constructor(serverUri: URI?, httpHeaders: Map<String?, String?>?) : super(
        serverUri,
        httpHeaders
    )

    constructor(
        serverUri: URI?,
        protocolDraft: Draft?,
        httpHeaders: Map<String?, String?>?
    ) : super(serverUri, protocolDraft, httpHeaders) {
        Draft_6455()
    }

    constructor(
        serverUri: URI?,
        protocolDraft: Draft?,
        httpHeaders: Map<String?, String?>?,
        connectTimeout: Int
    ) : super(serverUri, protocolDraft, httpHeaders, connectTimeout)

    override fun onOpen(handshakedata: ServerHandshake) {
    }

    override fun onMessage(message: String) {
    }

    override fun onClose(code: Int, reason: String, remote: Boolean) {
    }

    override fun onError(ex: Exception) {
    }
}